// 放置全局指令
import store from '@/store'
import Vue from 'vue'

Vue.directive('isShowEL', {
  'inserted'(el, binding) {
    const arr = store.state.user.profile.permissions
    if (store.state.user.profile.permissions[0] === '*:*:*') {
      return el
    }
    if (!arr.includes(binding.expression.replace(/'/g, ''))) {
      return el.remove()
    }
  }
})
